import Vue from 'vue'
import VueRouter from 'vue-router'
;
import RoleView from "@/views/RoleIndexView";
import LoginView from "@/views/LoginView";
import IndexView from "@/views/IndexView";
import DictDataView from "@/views/DictDataView";
import FarmersView from "@/views/FarmersIndexView";

Vue.use(VueRouter)

const routes = [
  {
    path: '/index',
    name: 'index',
    component: IndexView,
    children:[
      //动态添加子路由
    ]
  },
  {
    path: '/',
    name: 'login',
    component: LoginView
  },
  ,
  {
    path: '/dictData',
    name: 'dictData',
    component: DictDataView
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
